<% title "Recent commits for #{@repository}" %>

<%=partial(:repo_header) %>

<div id="commits">
  <% @commits.each do |commit| %>
    <div class="commit indent">
      <%=partial(:commit, :commit => commit) %>
    </div>
  <% end %>
</div>

<div id="pagination">
  <% if @offset+10 < @max_commits %>
  <a href="<%= commits_path(@repository, @page+1) %>" class="button" id="next">Next</a>
  <% end %>
  <% if @page > 1 %>
  <a href="<%= commits_path(@repository, @page-1) %>" class="button" id="previous">Previous</a>
  <% end %>
</div>
